package com.zhou.blog.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhou.blog.dao.pojo.Tag;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TagMapper extends BaseMapper<Tag> {
    /**
     * 根据文章ID查询文章的标签列表
     * @param id
     * @return
     */
    List<Tag> findTagsByArticleId(@Param("articleId") Long id);


    List<Long> findHotTagIds(@Param("limit") int limit);

    List<Tag> findTagsByTagIds(@Param(value = "tagIds") List<Long> tagIds);
}
